package com.ebs.md.api.abs;

/**
 * Revision Author:
 *  $File: //depot/MarketData/commons-md-api/MAIN/src/main/java/com/ebs/md/api/abs/AbsProductProvider.java $
 *  $Revision: #1 $
 *  $DateTime: 2012/04/29 09:26:44 $
 *  $Change: 110636 $
 *  $Author: Arik.Sher $
 */

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

import com.ebs.md.api.IProduct;


public abstract class AbsProductProvider<KEY, P extends IProduct>
{

	protected ConcurrentMap<KEY, P> cache = new ConcurrentHashMap<KEY, P>();
	
	
	public P getProduct(KEY key) {
		return cache.get(key);
	}
	
	public void storeKnownItem(KEY key, P item) {
		cache.put(key, item);
	}
	
}
